﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace df
{
    public partial class welcome : Form
    {
        public welcome()
        {
            InitializeComponent();


            SetForegroundWindow(Handle);
            ShowInTaskbar = false;

            timer1.Interval = 3000;
            timer1.Start();
        }


        /// <summary>
        /// 让窗体始终置顶
        /// </summary>
        /// <param name="hWnd">窗体句柄</param>
        /// <returns></returns>
        [System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "SetForegroundWindow")]
        public static extern bool SetForegroundWindow(IntPtr hWnd);//设置此窗体为活动窗体



        private void timer1_Tick(object sender, EventArgs e)
        {
            //需要脱离主线程触发
            DialogResult = DialogResult.OK;
            Dispose();
        }
    }
}
